<%-- 
    Document   : login
    Created on : 15-Jul-2013, 09:37:00
    Author     : MrMAD
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Book Store - Login</title>                
        <style>
            td{
                padding: 10px;
            }
            button{
                background: url("http://localhost:8080/FinalProject/images/templatemo_h1_bg.jpg") no-repeat scroll center center transparent;
                color: #FFFFFF;
                display: block;
                float: left;
                height: 30px;
                line-height: 25px;
                margin: 10px 0 0;
                text-align: center;
                text-decoration: none;
                width: 100px;
            }
            #button{
                background: url("http://localhost:8080/FinalProject/images/templatemo_h1_bg.jpg") no-repeat scroll center center transparent;
                color: #FFFFFF;
                display: block;
                float: left;
                height: 30px;
                line-height: 25px;
                margin: 10px 0 0;
                text-align: center;
                text-decoration: none;
                width: 100px;
                border: 1px solid white;
                font-size: 1em;
                font-weight: normal;
            }
            p {                                                
                color: #969547;          
                font-size: 13px;
                margin: 0 0 15px;
                padding: 10px;                
                width: 672px;
            }
        </style>
    </head>
    <body>
        <script src="../js/login.js"></script>
        <div id="templatemo_content_right">
            <fieldset style="border: 1px dashed #e6e154;">
                <legend style="color: #e6e154; font-size: 17px; padding-bottom: 10px;">Login into your account</legend>
                <%
                if(session.getAttribute("register") != null){
                    session.setAttribute("register", null);
                    out.println("<p style=\"padding-left: 10px;\">Your account has been created successfully.</p>");
                }
                %>
                <form name="login-form" method="POST" action="http://localhost:8080/FinalProject/MyProcess/login_process.jsp" style="color: #e6e154; font-size: 15px; padding-bottom: 10px;">
                    <table>
                        <%
                            String error = (String) session.getAttribute("error");
                            if(error != null){
                                out.println("<tr>" + error +"</tr>");
                            }
                            session.setAttribute("error", null);
                        %>
                        <tr>
                            <td>Email</td>
                            <td><input type="text" name="email"/></td>                            
                        </tr>
                        <tr>
                            <td>Password</td>
                            <td><input type="password" name="password"/></td>                            
                        </tr>
                        <tr>
                            <td><input  id="button" type="submit" value="Log in"/></td>                            
                            <td><a id="button" href="http://localhost:8080/FinalProject/register.jsp">Register</a></td>
                        </tr>
                    </table>
                </form>                
            </fieldset>
        </div><!-- end of content right -->
    </body>
</html>
